

$(document).ready(function(){
	var userId=getvl("userId");
	getDateList(userId,1);
	
});



function  getDateList(userId,current){
	$("#thislist").html("");
	   $.ajax({
        url: urlcore + "/api/flowDetail/selectUserTransferList?userId=" +userId+"&current="+current,
        type: "get",
        dataType: 'json',
        contentType: "application/json;charset=utf-8",
        success: function (data) {
        	var da=data.data.records;
        	var html="",gmtDatetime="";
        	
        	for(var i=0;i<da.length;i++){
        	gmtDatetime=formatDate(da[i].gmtDatetime,"yyyy-MM-dd HH:mm:ss")
        	    html+= " <tr >\n" +
			            " <td>" + (i + 1) + "</td>\n" +
			            " <td>" + da[i].userName+ "</td>\n" +
			            " <td>" + da[i].phone + "</td>\n" +
			            " <td>" + da[i].transferInName+ "</td>\n" +
			            " <td>" + da[i].transferInPhone + "</td>\n" +
			            " <td>" + da[i].money + "</td>\n" +
			            " <td>" +gmtDatetime+ "</td>\n" +
			            " </tr>";
        	}
        	$("#thislist").append(html);
        	     $("#pager").pager({
                pagenumber: current,
                pagecount: data.data.pages,
                totalcount: data.data.total,
                buttonClickCallback: PageClick
            });
        	
        }
    });
	
}

PageClick = function (pageclickednumber) {
		var userId=getvl("userId");
	getDateList(userId,pageclickednumber);
}
